package com.spring.springboot.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.spring.springboot.interceptor.JwtTokenInterceptor;

/**
*@author LSY
*Time: 2018年12月17日下午2:24:26
*
*
*/
@Configuration
public class JWTConfiguration implements WebMvcConfigurer{

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new JwtTokenInterceptor()).addPathPatterns("/api/**");
	}
}
